import request from '@/router/axios';

/**
 * 楼层装修设置
 *
 */
export function setHomeSetup(params) {
  return request({
    url: '/shop-base/base/pageData/add',
    contentType: 'application/x-www-form-urlencoded',
    method: 'post',
    data: params,
  });
}

/**
 * 获取页面信息
 *
 */
export function getHomeData(params) {
  return request({
    url: `/shop-base/base/pageData/${params}`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'get',
  });
}

/**
 * 查询楼层装修列表
 *
 */
export function getHomeList(params) {
  return request({
    url: '/shop-base/base/pageData/pageDataList',
    contentType: 'application/x-www-form-urlencoded',
    method: 'get',
    params: params,
  });
}

/**
 * 修改楼层装修
 *
 */
export function updateHome(id, params) {
  return request({
    url: `/shop-base/base/pageData/update/${id}`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'put',
    data: params,
  });
}

/**
 * 删除楼层装修
 *
 */
export function removePageHome(id) {
  return request({
    url: `/shop-base/base/pageData/remove/${id}`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'delete',
  });
}

/**
 * 发布页面
 *
 */
export function releasePageHome(id) {
  return request({
    url: `/shop-base/base/pageData/release/${id}`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'put',
  });
}

//管理员获取发送列表
export function getMessagePage(params) {
  return request({
    url: `/push/manager/message`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'get',
    params: params,
  });
}

//管理员获取发送列表
export function sendMessage(params) {
  return request({
    url: `/push/manager/message`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'post',
    data: params,
  });
}
//管理员获取发送详情列表
export function getShopMessage(params) {
  return request({
    url: `/supplier/manager/message/store`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'get',
    params: params,
  });
}

//管理员获取会员意见反馈
export function getMemberFeedback(params) {
  return request({
    url: `/user/feedback`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'get',
    params: params,
  });
}

//管理员获取会员意见反馈
export function getMemberFeedbackDetail(id) {
  return request({
    url: `/user/feedback/${id}`,
    contentType: 'application/x-www-form-urlencoded',
    method: 'get',
  });
}
